{extend name="base" /}

{block name="content"}

<div class="g-main">

    <div class="m-main-title">

        <div class="m-container-fluid">

            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>

            <span class="icon-angle-right"></span>

            <span>商城</span>

            <span class="icon-angle-right"></span>

            <span>邮费模板</span>

            <span class="icon-angle-right"></span>

            <span>邮费模板列表</span>

            <a class="u-flush"><i class="icon-repeat"></i></a>

        </div>

    </div>

    <div class="m-main-content">

        <div class="m-container">

            <table class="m-table">

                <tr>

                    <th>

                        <div class="m-options cf">

                            <div class="m-opts fl"><a href="{:url('add')}" class="u-btn"><i class="icon-plus"></i>添加邮费模板</a></div>


                        </div>

                    </th>

                </tr>

            </table>

            <form class="layui-form m-list-form">

                <table class="m-table mt-10">

                    <tbody class="datas">

                        <tr>

                            <th width="5%" style="text-align: center;">选择</th>

                            <th width="5%">排序</th>

                            <th width="5%">ID</th>

                            <th width="20%">基础邮费</th>

                            <th width="20%">类型</th>

                            <th width="25%">内容</th>

							<th width="25%">包邮条件</th>

                            <th width="10%">操作</th>

                        </tr>

                        {foreach name="data" item="v"}

                        <tr>

                            <td align="center"><input type="checkbox" name="id[]" class="u-id" value="{$v.id}" lay-skin="primary" /></td>

                            <td><input type="text" name="list_order[{$v.id}]" lay-skin="primary" class="u-ipt u-ipt-tiny" value="{$v.list_order}" /></td>

                            <td>{$v.id}</td>

                            <td>{$v.postage_amount}</td>

                            <td>{$v.type_txt}</td>

                            <td>{if $v.type == 1}
								统一收取基础邮费
								{elseif $v.type == 2}
								首重{$v.weight},每增加1kg多收{$v.weight_amount}
								{elseif $v.type ==3}
								件数乘以基础邮费
								{else}
								地址为{$v.area_txt}等地区时进行收取费用
								{/if}
							</td>

							<td>{if $v.reduction_amount > 0}
								订单金额到达{$v.reduction_amount}元包邮
								{else}
								不包邮
								{/if}
							</td>

                            <td class="m-opt"><a href="{:url('add', ['id' => $v.id])}" title="编辑"><i class="icon-pencil"></i></a><a href="javascript:;" title="删除" class="u-del" data-id="{$v.id}"><i class="icon-trash"></i></a></td>

                        </tr>

                        {/foreach}

                        <tr>

                            <td align="center"><input type="checkbox" value="1" lay-skin="primary" lay-filter="select_ids" /></td>

                            <td colspan="7" class="m-options"><button class="u-btn u-batch-del"><i class="icon-trash"></i>批量删除</button><button class="u-btn u-batch-sorted"><i class="icon-sort"></i>批量排序</button></td>

                        </tr>

                    </tbody>

                </table>

            </form>

            {include file="public:page" /}

        </div>

    </div>

</div>

{/block}

{block name="extrajs"}

{include file="laypage" /}

{/block}
